/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package pkg10340;

import java.util.*;
import java.text.*;
import java.math.*;
import java.lang.*;
import java.io.*;

public class Main {

    BufferedReader reader;
    
    public static void main(String[] args)throws IOException {
        Main ob = new Main();
        ob.run();
        System.exit(0);
    }
    public void run()throws IOException{
        reader = new BufferedReader( new InputStreamReader(System.in) );
        //reader = new BufferedReader( new FileReader("in.txt") );
        
        String line ;
        while( (line=reader.readLine()) !=null ){
            String[] s = line.split("[' ']");
            doit(s);
        }
    }
    public void doit(String[] s)throws IOException{
        int m = s[0].length();
                       
        int i,j=0;
        for(i=0;i<m;++i ){
             int now_index = Find(s[1], s[0].charAt(i), j);
             if( now_index == -1 ){
                 System.out.println("No");
                 return ;
             }
             else{
                 j = now_index+1;
             }
        }
        
        System.out.println("Yes");
    }
    public int Find(String ss,char ch, int index){
        for(int i=index;i<ss.length();++i){
            if(ch==ss.charAt(i)){
                return i;
            }
        }
        return -1;
    }
    
}
